You must also supply an error string for each error message that you want to make available to your functions. Each error string contains only the text you want to display when an error is detected, and it must be in the format:
Note: C compilers view the first string in the table as Error 0, the second as Error 1, etc. Each string in the error table corresponds to an error code that you define. For each user error code, there must be a message string in the error table at the corresponding index, where the first string is at index 0.
Each UFL C function must return a value of the enumerated type UFError, defined in ufdll.h. Return UFNoError if no error occurred. Return one of the other UFError values if there is an error. Try to choose one of the predefined values if it fits your situation. If the error is specific to your UFL, set the ReturnValue.UFReturnUserError member of the parameter block to an error code value you have defined and return UFUserError from your function code. The Formula Editor will then call back to return the error string that you have defined in the error table.
The Formula Editor passes a parameter block to a UFL function rather than individual parameters. Obtaining parameter values from the parameter block, will examine how to handle parameter blocks.
All error strings must be set up in a table with the following heading:
An error table for the Picture function should, at a minimum, look like this:
char *ErrorTable[] =
{
"no error"
};
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |